﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CQFQW
{
    /// <summary>
    /// 投票相关的数
    /// </summary>
    [Serializable]
    public class VoteCount
    {
        /// <summary>
        /// 成功数
        /// </summary>
        private int successCount=0;

        /// <summary>
        /// 成功数
        /// </summary>
        public int SuccessCount
        {
            get
            {
                lock (this)
                { return successCount; }
            }
            set
            {
                lock (this)
                { successCount = value; }
            }
        }

        /// <summary>            
        /// 失败数               
        /// </summary>           
        private int failureCount=1;

        /// <summary>            
        /// 失败数               
        /// </summary> 
        public int FailureCount
        {
            get
            {
                lock (this)
                { return failureCount; }
            }
            set
            {
                lock (this)
                { failureCount = value; }
            }
        }

        /// <summary>            
        /// 异常数               
        /// </summary>           
        private int exceptionCount=1;

        /// <summary>            
        /// 异常数               
        /// </summary> 
        public int ExceptionCount
        {
            get
            {
                lock (this)
                { return exceptionCount; }
            }
            set
            {
                lock (this)
                {
                    exceptionCount = value;
                }
            }
        }

        /// <summary>
        /// 序号
        /// </summary>
        private int numberCount = 1;
        /// <summary>
        /// 序号
        /// </summary>
        public int NumberCount
        {
            get
            {
                lock (this)
                {
                    return numberCount;
                }
            }
            set
            {
                lock (this)
                {
                    numberCount = value;
                }
            }
        }

        /// <summary>
        /// 程序 并发数 (投票需换IP时不可用)
        /// </summary>
        public int SimultaneouslyCount = 1;

        /// <summary>
        /// 相同的IP,投票次数(同一IP，可投票次数)
        /// </summary>
        public readonly int sameIPVoteCount = 1;

        /// <summary>
        /// 程序停止数
        /// </summary>
        public readonly int stopNumber=100;

        public VoteCount()
        {
        }

    }
}
